﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;


using System.Drawing;

namespace HAVTKPack
{

    [Serializable ]
   public   class ContourLineProperty
    {
        public ContourLineProperty()
        { 
        
        
        
        }



        CONTOURTYPE _contourFillOrLine = CONTOURTYPE.LinearAndColorFill;

        public CONTOURTYPE ContourFillOrLine
        {
            get { return _contourFillOrLine; }
            set { _contourFillOrLine = value; }
        }



        //ContourDisplayType _contourDisplayType = ContourDisplayType.Linear;
        ///// <summary>
        ///// ContourOptions中的Contour选项控制
        ///// </summary>
        //public ContourDisplayType ContourType
        //{
        //    get { return _contourDisplayType; }
        //    set { _contourDisplayType = value; }
        //}
        //double _scalarRangeMin = 0.0;

        //public double ScalarRangeMin
        //{
        //    get { return _scalarRangeMin; }
        //    set { _scalarRangeMin = value; }
        //}

        //double _scalarRangeMax = 0.0;

        //public double ScalarRangeMax
        //{
        //    get { return _scalarRangeMax; }
        //    set { _scalarRangeMax = value; }
        //}


        bool _isUseCellRealData = false;
        /// <summary>
        /// 是否使用单元格的真实数据（不插值到点）
        /// </summary>
        public bool IsUseCellRealData
        {
            get { return this._isUseCellRealData; }
            set { this._isUseCellRealData = value; }

        }

        bool _isSpecifyPrecision = false;
        /// <summary>
        /// 是否使用统一小数点位数控制
        /// </summary>
        public bool IsSpecifyPrecision
        {
            get { return _isSpecifyPrecision; }
            set { _isSpecifyPrecision = value; }
        }

        int _decimalDigitNum = 3;
        /// <summary>
        /// 小数点位数  包括等值线值，等值线标注，图例文本等等
        /// 主程序约定：
        /// 不使用统一小数点位数时：使用最大15位控制
        /// 使用统一小数点位数时：最小1位，最大15位
        /// </summary>
        public int DecimalDigitNum
        {
            get { return _decimalDigitNum; }
            set { _decimalDigitNum = value; }
        }

        bool _isUseScientificNotation = false;
        /// <summary>
        /// 是否使用科学计算法表示
        /// </summary>
        public bool IsUseScientificNotation
        {
            get { return _isUseScientificNotation; }
            set { _isUseScientificNotation = value; }
        }




        int _lineWidth = 2;
        /// <summary>
        /// 等值线线条宽度
        /// </summary>
        public int LineWidth
        {
            get { return _lineWidth; }
            set { _lineWidth = value; }
        }



        Color _lineColor = Color.Black;
        /// <summary>
        /// 等值线线条颜色
        /// </summary>
        public Color LineColor
        {
            get { return _lineColor; }
            set { _lineColor = value; }
        }




        public void UpdateContourLineProperty(ContourLineProperty contourLineProperty)
        {



            if (contourLineProperty != null)
            {
                if (this._contourFillOrLine != contourLineProperty._contourFillOrLine)
                {
                    this._contourFillOrLine = contourLineProperty._contourFillOrLine;
                }

                if (this._isUseCellRealData !=contourLineProperty ._isUseCellRealData )
                {
                    this._isUseCellRealData = contourLineProperty._isUseCellRealData;
                }

                if (this._isSpecifyPrecision !=contourLineProperty ._isSpecifyPrecision )
                {
                    this._isSpecifyPrecision = contourLineProperty._isSpecifyPrecision;
                }


                if (this._decimalDigitNum != contourLineProperty._decimalDigitNum)
                {
                    this._decimalDigitNum = contourLineProperty._decimalDigitNum;
                }
                if (this._isUseScientificNotation !=contourLineProperty ._isUseScientificNotation )
                {
                    this._isUseScientificNotation = contourLineProperty._isUseScientificNotation;
                }


                if (this._lineWidth != contourLineProperty._lineWidth)
                {
                    this._lineWidth = contourLineProperty._lineWidth;
                }
                if (this._lineColor != contourLineProperty._lineColor)
                {
                    this._lineColor = contourLineProperty._lineColor;
                }


            }

        }


        public void UpdateContourFillOrLine(CONTOURTYPE contourFillOrLine)
        {
            this._contourFillOrLine = contourFillOrLine;
        }



    }
}
